# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>

pkgname=deepin-dock
pkgver=6.0.23
pkgrel=1
pkgdesc='The dock of Deepin Desktop Environment'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-dock"
license=('LGPL3')
depends=('deepin-menu' 'deepin-daemon' 'deepin-launcher' 'deepin-qt5integration'
         'deepin-network-core' 'deepin-control-center' 'dwayland' 'wayland' 'dtkcore' 'dtkgui' 'dtkwidget'
         'qt5-base' 'qt5-svg' 'qt5-x11extras' 'qt5-wayland' 'glib2' 'gsettings-qt' 'libdbusmenu-qt5'
         'libx11' 'libxext' 'libglvnd' 'libxtst' 'libxcursor' 'libxres' 'libxcb' 'libxkbcommon'
         'xcb-util-wm' 'xcb-util-image' 'gcc-libs' 'dconf' 'deepin-application-manager'
         'deepin-appearance' 'deepin-widgets' 'deepin-wloutput-daemon')
makedepends=('cmake' 'ninja' 'qt5-tools' 'extra-cmake-modules')
conflicts=('dde-dock')
replaces=('dde-dock')
groups=('deepin')
source=("https://github.com/linuxdeepin/dde-dock/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('a21da5e9d8b33f0d7c165906bc35d93239fbfcb002b42af3d1e43ad2827869036261377e93b93205c9f4a2e6fccd015b4eb8085b8488f7fb482bb7586cce0395')

build() {
  cd dde-dock-$pkgver
  cmake . -GNinja \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc
  ninja
}

check() {
  cd dde-dock-$pkgver
  # ninja test
}

package() {
  cd dde-dock-$pkgver
  DESTDIR="$pkgdir" ninja install
}
